using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class YaoGan : MonoBehaviour
{
    [Header(" Elements ")]
    [SerializeField] private RectTransform joystickOutline;//Joystick的外框
    [SerializeField] private RectTransform joystickKnob;//Joystick的中心点

    [Header(" Settings ")]
    [SerializeField] private float moveFactor = 10f;//Joystick的移动速度系数
    private Vector3 joystickPos;//记录Joystick第一次点击的位置
    private bool canControl;

    // Start is called before the first frame update
    void Start()
    {
        //HideJoystick();//初始化时隐藏Joystick
    }

    // Update is called once per frame
    void Update()
    {
        // if(canControl)
        //     ControlJoystick();
    }

    public void Onjoystickdown()
    {
        joystickPos = Input.mousePosition;//记录点击位置
        Debug.Log(joystickPos);
        // joystickOutline.position = joystickPos;
        // ShowJoystick();//显示Joystick

    }
}
